package park;

import java.util.ArrayList;

public class ReviewServiceImpl implements ReviewService {
	
	private ReviewDAO redao;
	
	//J24ProfessorDAOImpl 로 되어있다가 J24ProfessorServiceImpl로 바꿈
	public ReviewServiceImpl(){ 
		
		redao = new ReviewDAOImpl();
		
	}
	
	@Override
	public void newReview() {
		ReviewVO revo = new ReviewVO(reno, conno, mno, reregdate, regrd, recomment);
		
		// 여기서 syso을 씌워준다 pdao.insertProfessor(pvo);
		System.out.println(redao.insertReview(revo));
	}
	
	@Override
	public void readReview() {//입력받아서 pdao.selectProfessor(); 호출
		ArrayList<ReviewVO> revoes = new ArrayList<>();
		revoes = redao.selectReview();//read는 syso 안함
		//pdao.selectProfessor();
		
		for(ReviewVO r : revoes){
			System.out.println(r);
		}
		
	}
	
	
	@Override
	public void readOneReview() {
		String reno = "";
		ArrayList<ReviewVO> revoes = new ArrayList<>();
		revoes = redao.selectOneReview(reno);
	}

	@Override
	public void modifyReview() {
		String reno = "";
		System.out.println(redao.updateReview(reno));
	}

	@Override
	public void removeReview() {
		String reno = "";
		System.out.println(redao.deleteReview(reno));

	}

}
